<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title>txtSQL Documentation</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<link rel="stylesheet" type="text/css" href="./includes/style.css" />
	<script src="./includes/javascript.js"></script>
</head>
<body>

<table width="96%" cellspacing="0" cellpadding="9" border="0" align="center" class="mainTable">
	<tr>
		<td class="header" colspan="2">
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<td align="left">
						<a href="index.html">Home</a>
						&nbsp; &nbsp;<a href="javascript:history.back()">Back</a>
						&nbsp; &nbsp;<a href="javascript:history.forward()">Forward</a>
						&nbsp; &nbsp;<a href="javascript:location.reload()">Refresh</a>
						&nbsp; &nbsp;<a href="http://chibiguy.dotgeek.org/index.php">txtSQL Homepage</a>
					</td>
					<td align="right">
						<a href="http://chibiguy.dotgeek.org/index.php" target="_blank"><img src="includes/txtsql_powered_small.gif" /></a>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr valign="top">
		<td class="mainCell">
			<div class="dashedUnderline"><a href="index.html">txtSQL Documentation</a> > <a  href="3.html">Database Functions</a> > dropdb</div><br />

			<table width="100%">
				<tr valign="bottom">
					<td align="left">
						<div class="h1">dropdb <div style="font-size: 10px;">Purpose: To permanently delete a txtSQL database</div></div>
					</td>
					<td align="right">
						txtSQL >= 2.0.0 Beta					</td>
				</tr>
			</table>

			<div class="syntax">void dropdb ( array( 'db' => $db ) )</div><br />

			<div class="content">
				This function will <i>PERMANENTLY</i> drop a database ( so that means no undo-ing ), as long as it exists
      <br /><br />
      <b>Note</b>- This function will return <i>false</i> if the database doesn't already exists, or if the database specified is 'txtsql'			</div><br /><br />

			
						<table width="100%" cellspacing="0" cellpadding="0">
				<tr>
					<td align="left">
						<b>Example 9: dropdb()</b>
					</td>
					<td align="right">
						<a href="javascript: ClipBoard(copytext1)">Copy to clipboard</a>
					</td>
				</tr>
			</table>
			<table width="100%" cellspacing="0" cellpadding="3" class="examples">
				<tr>
					<td id="copytext1">
						<code><font color="#000000">
<font color="#0000BB">&lt;?php<br /></font><font color="#FF8000">// txtSQL dropped a database named testDatabase <br /></font><font color="#007700">if ( !</font><font color="#0000BB">$sql</font><font color="#007700">-&gt;</font><font color="#0000BB">dropdb</font><font color="#007700">(array(</font><font color="#DD0000">'db' </font><font color="#007700">=&gt; </font><font color="#DD0000">'testDatabase'</font><font color="#007700">)) ) <br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#DD0000">'Error creating txtSQL DB, txtSQL said: '</font><font color="#007700">.</font><font color="#0000BB">$sql</font><font color="#007700">-&gt;</font><font color="#0000BB">get_last_error</font><font color="#007700">()); <br />}<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code>					</td>
				</tr>
			</table><br /><br />

			<TEXTAREA ID="holdtext" STYLE="display: none;"></TEXTAREA>			
			<table class="commentTable">
				<tr>
					<td style="border: 0px solid; margin: 0px; padding: 0px;">
						<table width="100%">
							<tr>
								<td style="border:0px solid;">
									<div class="h1">User Comments - dropdb</div>
								</td>
								<td align="right" style="border: 0px solid; padding: 0px; margin: 0px;">
									
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="row1" align="center">
						No comments posted yet; 
					</td>
				</tr>
			</table>
		</td>

		<td class="sideCell">
		
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="dashedUnderline">
				<tr>
					<td align="left">
						<a  href="21.html">Last Page</a>					</td>
					<td align="right">
						<a  href="23.html">Next Page</a>					</td>
				</tr>
			</table><br />

			
			<a style="font-weight: bold;"  href="1.html">'Language Reference'</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="13.html">User Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="19.html">Database Functions</a></b><br />
			<li /> <a  href="20.html">showdbs</a><br />
			<li /> <a  href="21.html">createdb</a><br />
			<li /> <i>dropdb</i><br />
			<li /> <a  href="23.html">renamedb</a><br />
			<li /> <a  href="24.html">isLocked</a><br />
			<li /> <a  href="25.html">lockdb</a><br />
			<li /> <a  href="26.html">unlockdb</a><br />
			<li /> <a  href="27.html">selectdb</a><br />
			<li /> <a  href="48.html">db_exists</a><br />
			<br />

			<a style="font-weight: bold;"  href="28.html">Data Manipulation Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="34.html">Table Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="42.html">Error Handling Functions</a></b><br />
			<br />

			<a style="font-weight: bold;"  href="52.html">SQL Syntax</a></b><br />
			<br />

		</td>
	</tr>
	<tr>
		<td colspan="2" class="notices" align="center">
			[ txtSQL Documentation powered by <a href="http://chibiguy.dotgeek.org" target="_blank">txtSQL</a> | 6 SQL Queries ]
		</td>
	</tr>
</table>

</body>
</html>